package com.wicket.okrframework.biz.service.dto.req;

import com.wicket.okrframework.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;


@Data
public class BaseChangeColumnDto extends BaseDto implements Serializable {

    /**
     * 对象属性编码:
     */
    @ApiModelProperty("对象属性编码")
    private String propertyCode;

    /**
     * 对象属性名称:
     */
    @ApiModelProperty("对象属性名称")
    private String objectPropertyName;

    /**
     * 变更字段中文内容:
     */
    @ApiModelProperty("变更字段中文内容")
    private String columnContent;

    /**
     * 原始字段中文内容:
     */
    @ApiModelProperty("原始字段中文内容")
    private String oriColumnContent;
    /**
     * 变更字段内容:
     */
    @ApiModelProperty("变更字段内容")
    private String metaDataColumnContent;
    /**
     * 对象属性编码:
     */
    @NotNull(message = "对象属性编码不能为空")
    @ApiModelProperty("对象属性编码")
    private String objectPropertyCode;
    /**
     * 内容表主键ID:
     */
    @NotNull(message = "内容表主键ID不能为空")
    @ApiModelProperty("内容表主键ID")
    private String entityId;
    /**
     * 变更字段记录ID:
     */
    @ApiModelProperty("变更字段记录ID")
    private String changeColumnId;
    /**
     * 内容表类型编码:
     */
    @ApiModelProperty("内容表类型编码")
    private String tableTypeCode;
/**
     * 主体变更日志类型
     */
    @ApiModelProperty("主体变更日志类型")
    private String	 subjectChangeType;

    /**
     * 111111批次下更新状态 NEW:本次新增 UNCHANGED:正常未变 REVISION:本次修订 ARCHIVE:本次存档
     */
    @ApiModelProperty("111111批次下更新状态")
    private String	 updateStatus;

    /**
     * 操作人就职记录ID
     */
    @ApiModelProperty("操作人就职记录ID")
    private String	 operationInductionId;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;
/**
     * 主体批次下更新状态 NEW:本次新增 UNCHANGED:正常未变 REVISION:本次修订 ARCHIVE:本次存档
     */
    @ApiModelProperty("主体批次下更新状态")
    private String	 subjectUpdateStatus;

    @Override
  public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;
      if (!super.equals(o)) return false;
      BaseChangeColumnDto that = (BaseChangeColumnDto) o;
      return  propertyCode == that.propertyCode&&objectPropertyName == that.objectPropertyName&&columnContent == that.columnContent&&oriColumnContent == that.oriColumnContent&&metaDataColumnContent == that.metaDataColumnContent&&objectPropertyCode == that.objectPropertyCode&&entityId == that.entityId&&changeColumnId == that.changeColumnId&&tableTypeCode == that.tableTypeCode&&subjectChangeType == that.subjectChangeType&&updateStatus == that.updateStatus&&operationInductionId == that.operationInductionId&&operateTime == that.operateTime&&subjectUpdateStatus == that.subjectUpdateStatus;
    }

    @Override
  public int hashCode() {
      return Objects.hash(super.hashCode(), propertyCode,objectPropertyName,columnContent,oriColumnContent,metaDataColumnContent,objectPropertyCode,entityId,changeColumnId,tableTypeCode,subjectChangeType,updateStatus,operationInductionId,operateTime,subjectUpdateStatus);
    }
}
